// components/personalCenter/editPersonalCenter.js
Component({
  /**
   * 组件的初始数据
   */
  data: {
    edit_morning:false,
    share_morning:false,
    new_wei_activity: false,
    new_job: true,
  },

  /**
     * 开启多组件支持
     * **/
  options: {
    multipleSlots: true//启用多slot支持
  },

  /**
   * 组件的属性列表
   */
  properties: {
    editPersonalCenter:{
      type:Object,
      value:"",
      observer:function(new_val,old_val){
        console.log(new_val)
        let that = this;
        that.setData({
          edit_morning: new_val.edit_morning,
          share_morning: new_val.share_morning,
          new_job: new_val.new_job,
          new_wei_activity: new_val.new_wei_activity
        })
      }
    }
  },

  /**
   * 组件的方法列表
   */
  methods: {
    /**
     * 点击编辑按钮
     * **/
    to_edit_morning:function(){
      wx.navigateTo({
        url: '/pages/editView/morning/generatePoster',
        success: function (res) { },
        fail: function (res) { },
        complete: function (res) { },
      })
    },
    /**
     * 点击分享
     * **/
    to_share_morning: function () {
      wx.navigateTo({
        url: '/pages/showView/morning/shareMorning',
        success: function (res) { },
        fail: function (res) { },
        complete: function (res) { },
      })
    },
    /**
     * 点击跳转到新建活动
     * **/
    to_new_activity:function(){
      wx.navigateTo({
        url: '/pages/editView/signUp/newWeiActivity',
      })
    },
    clickPersonalCenter:function(){
      wx.navigateTo({
        url: '/pages/editView/personalCenter/personalCenter',
      })
    },

    /**
     * 跳转新建招聘
     * **/
    to_new_job:function(){
      wx.navigateTo({
        url: '/pages/editView/recruit/recruit',
      })
    }
  }
})
